<?php
    include('../lib/conn.php');

    $res = file_get_contents('php://input');

    $arr = json_decode($res);

    $username=$arr->username;
    $password=$arr->password;
    $email=$arr->email;
    $phone=$arr->phone; 

    $sql_ins = "insert into users(username,password,email,phone)values('$username','$password','$email','$phone')";
    $res_ins = $mysqli->query($sql_ins);
    if($res_ins){
        echo '{"register":true}';
    }else{
        echo '{"register":false}';        
    }
?>